<?php 	namespace Common\Model;
use Hdphp\Model\Model;
/*
 * 品牌管理模型
 * */
 class Brand extends Model
 {
 	protected $table = "brand";
	//自动验证
	protected $validate = array(
		array("bname","required","分类名称不能为空",3,3),
		array("bname","maxlen:10","分类名称不能超过10个字符",3,3),
//		array("sort","num:1,123456","分类排序必须为数字",3,3),
	);
	/**
	 * 添加
	 */
	public function store()
	{
		//自动验证
		if(!$this->create()) return false;
		//执行添加
		return $this->add();
	}
 }
